
	<context:annotation-config />
	<context:component-scan base-package="${packagePath}" />
	<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
		destroy-method="close">
		<property name="driverClassName" value="com.mysql.jdbc.Driver" />
		<property name="url" value="jdbc:mysql://localhost:3306/babasport?useUnicode=true&amp;characterEncoding=UTF-8" />
		<property name="username" value="root" />
		<property name="password" value="123" />
	</bean>
	<bean id="sessionFactory"
		class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
		<property name="dataSource">
			<ref bean="dataSource" />
		</property>
		<property name="mappingResources">
			<value>${_hbmDirName}</value>
		</property>
		
		<property name="hibernateProperties">
             <props>
	       		<prop key="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</prop>
	       		<prop key="hibernate.hbm2ddl.auto">update</prop>
				<prop key="hibernate.show_sql">true</prop>
	       		<prop key="hibernate.format_sql">true</prop>
				<prop key="hibernate.cache.use_second_level_cache">true</prop>
	       		<prop key="hibernate.cache.use_query_cache">false</prop>
				<prop key="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</prop>
     		</props>
         </property>
	</bean>
	
	<bean id="transactionManager"
		class="org.springframework.orm.hibernate3.HibernateTransactionManager">
		<property name="sessionFactory">
			<ref bean="sessionFactory" />
		</property>
	</bean>
